"use strict";

var path = require("path");
var Pageres = require("pageres");
var build = path.join(__dirname, "..", "doc", "scrot");
var resolutions = [
  "320x240",
  "640x480",
  "800x600",
  "1024x768",
  "1200x900",
  "1440x1024",
  "1900x1200",
  "3000x1900"
];

function scrot(done) {
  new Pageres()
    .src("http://localhost:8080/build", resolutions)
    .dest(build)
    .run()
    .then(() => done());
}

module.exports = scrot;
